package com.iot.product.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 产品表(包括网桥产品)
 * </p>
 *
 * @author 孟繁森
 * @since 2021-03-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("iot_product")
@ApiModel(value = "IotProduct对象", description = "产品表(包括网桥产品)")
public class Product implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "客户id")
    private String clientId;

    @ApiModelProperty(value = "阿里云账号id")
    private String aliAccountId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "所属品类标识")
    private String categoryKey;

    @ApiModelProperty(value = "所属品类名称")
    private String categoryName;

    @ApiModelProperty(value = "节点类型 1:设备,2:网关")
    private Integer nodeType;

    @ApiModelProperty(value = "连网方式 1:wifi")
    private Integer netType;

    @ApiModelProperty(value = "数据格式 1:Alink协议,2:透传/自定义")
    private Integer dataFormat;

    @ApiModelProperty(value = "校验级别 1:弱校验,2:免校验")
    private Integer validateType;

    @ApiModelProperty(value = "认证方式 1:密钥校验2：Id认证")
    private Integer authType;

    @ApiModelProperty(value = "更多信息")
    private String description;

    @ApiModelProperty(value = "ProductKey")
    private String productKey;

    @ApiModelProperty(value = "ProductSecret")
    private String productSecret;

    @ApiModelProperty(value = "自己的ProductKey")
    private String myProductKey;

    @ApiModelProperty(value = "自己的ProductSecret")
    private String myProductSecret;

    @ApiModelProperty(value = "动态注册 0:关闭,1:开启")
    private Integer dynamicRegister;

    @ApiModelProperty(value = "是否是网桥产品 0:不是,1:是")
    private Integer serverType;

    @ApiModelProperty(value = "设备数量")
    private Integer deviceNumber;

    @ApiModelProperty(value = "产品状态 0:开发中,1:以上线")
    private Integer useStatus;

    @ApiModelProperty(value = "是否删除 0:未删除,1:已删除")
    @TableLogic
    private Integer deleteStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ApiModelProperty(value = "修改者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;


    /**
     * 关联字段: iot_client
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "客户账户")
    private String cAccountName;

    /**
     * 关联字段: iot_ali_account
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "阿里云账户")
    private String aAccountName;


}
